public class Combine<E> {
  
  Tree tree;
  HeapNode node = new HeapNode();
  
  public Combine() {
    node = new HeapNode();
  }
  
  //Combines two nodes into one node and then returns the result
  public HeapNode combine(HeapNode left, HeapNode right){
    node.setNextLeft(left);
    node.setNextRight(right);
    return node;
  }
  
  //Prints the content of the trees
  public void print() {
    tree.printInorder(1);
  }
  
  //Gets the root of the tree
  public E getRoot(){
    return (E)tree.getElement(0);
  }
}